package com.example.springbootdemo.scene.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 *@author xuwangqi
 *@date 2021/5/24 15:58
 **/
@ApiModel(value="com-example-springbootdemo-scene-entity-UserRole")
@Data
@TableName(value = "user_role")
public class UserRole {
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value="")
    private Integer id;

    /**
     * 角色表外键
     */
    @TableField(value = "role_id")
    @ApiModelProperty(value="角色表外键")
    private Integer roleId;

    /**
     * 用户表外键
     */
    @TableField(value = "user_id")
    @ApiModelProperty(value="用户表外键")
    private Integer userId;

    /**
     * 用户姓名
     */
    @TableField(value = "user_realname")
    @ApiModelProperty(value="用户姓名")
    private String userRealname;

    /**
     * 角色代码
     */
    @TableField(value = "role_code")
    @ApiModelProperty(value="角色代码")
    private String roleCode;

    /**
     * 角色名称
     */
    @TableField(value = "role_name")
    @ApiModelProperty(value="角色名称")
    private String roleName;

    public static final String COL_ID = "id";

    public static final String COL_ROLE_ID = "role_id";

    public static final String COL_USER_ID = "user_id";

    public static final String COL_USER_REALNAME = "user_realname";

    public static final String COL_ROLE_CODE = "role_code";

    public static final String COL_ROLE_NAME = "role_name";
}